package Person.File;

import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.IOException;
import java.nio.charset.StandardCharsets;

public class FileOutputStreamDemo03 {
    public static void main(String[] args) throws IOException {
        FileOutputStream fos = new FileOutputStream("d:\\fos.txt",true);


        //FileOutputStream fos = new FileOutputStream("d:\\fos.txt") ;
        for(int i=0;i<10;i++){
            fos.write("hello".getBytes());
            fos.write("\n".getBytes());
        }
        fos.close();
    }
}
